﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="OAclient.Common" %>
<div id="notifylist">
    <div style="margin-top: 35px;">
        <table border="0" width="100%" class="table_style" cellpadding="0" cellspacing="0">
            <thead>
                <tr>
                    <th>
                        标题
                    </th>
                    <th>
                        创建时间
                    </th>
                    <th>
                        内容
                    </th>
                    <th>
                    </th>
                </tr>
            </thead>
            <tbody>
                <%
                    System.Data.DataTable dt = ViewData["dt"] as System.Data.DataTable;
                    if (dt == null || dt.Rows.Count == 0)
                    {%>
                <tr>
                    <td colspan="0" style="text-align: center;">
                        当前无数据！
                    </td>
                </tr>
                <%}
                    else
                    {
                        int count = dt.Rows.Count;
                        for (int i = 0; i < count; i++)
                        {
                %>
                <tr>
                    <td>
                        <div class="msg">
                            <%=dt.Rows[i]["标题"]%></div>
                    </td>
                    <td>
                        <%=DateTime.Parse(dt.Rows[i]["创建时间"].ToString()).ToString("yyyy-MM-dd HH:mm")%>
                    </td>
                    <td>
                        <%=Server.HtmlDecode(dt.Rows[i]["内容"].ToString())%>
                    </td>
                    <td>
                    </td>
                </tr>
                <%
                    }
                    }%>
            </tbody>
        </table>
    </div>
    <div id="pageLink">
        <%var pageInfo = ViewData["pageInfo"] as PagingInfo; %>
        <%if (pageInfo != null)
          { %>
        <%=Ajax.PageLinks(pageInfo, index => Url.Action("NotifyList", new { page = index }), new AjaxOptions { UpdateTargetId = "workarea-notify-1" })%>
        <%} %>
    </div>
</div>
